Cascade PortChannel admin shutdown to member ports#4424
Open
spandan-nexthop wants to merge 1 commit intosonic-net:masterfrom
Open
Cascade PortChannel admin shutdown to member ports#4424spandan-nexthop wants to merge 1 commit intosonic-net:masterfrom
spandan-nexthop wants to merge 1 commit intosonic-net:masterfrom
Conversation
Collaborator
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
When a PortChannel is admin-shut, force all member ports admin-down. This allows the peer device to immediately detect link-down instead of waiting for LACP timeout. On PortChannel admin-up (or member removal/LAG deletion), restore each member to its configured admin state from APP_DB. Signed-off-by: Spandan Chowdhury <[email protected]>
c849920 to
b8f0a86
Compare
Collaborator
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When a PortChannel is admin-shut, force all member ports admin-down. This allows the peer device to immediately detect link-down instead of waiting for LACP timeout.
On PortChannel admin-up (or member removal/LAG deletion), restore each member to its configured admin state from APP_DB.
What I did
Added
cascadeLagAdminStatusToMembers()inportsorchwhich propagates LAG admin-down to member ports viasetPortAdminStatus().Added a guard in
doPortTask()to prevent APP_DB from overriding the forced state.On LAG admin-up (or member removal/LAG deletion), each member's configured admin status is restored to the intended state.
Why I did it
When a PortChannel is admin-shut, its member links' transceivers remain physically active.
The peer device must rely on LACP timeout to detect the PortChannel is down, which introduces unnecessary delay (up to 90s with long timeout).
How I verified it
test_lag_admin_down_cascades_to_members,test_lag_deletion_restores_member_admin_stateconfig interface shutdown PortChannelXXXX→ verify member port LEDs go off and peer detects link-down immediatelyDetails if related
Fixes: sonic-net/sonic-buildimage#26494
cc: @venkit-nexthop @kalash-nexthop